package com.framework.model.module.user;

import com.framework.common.annotation.QueryParam;
import com.framework.common.model.validation.ValidationGroup;
import com.framework.common.util.other.NumeralUtil;
import com.framework.model.base.BaseModel;
import java.io.Serializable;
import javax.validation.constraints.Digits;
import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 * @author 龘鵺
 * @version 1.0
 * @className com.framework.model.module.user.Rights
 * @title 用户权限类
 * @datetime 2024-05-14 09:59:18
 */
public class Rights extends BaseModel implements Serializable {
    /**
     * 启用状态 ENABLE_STATUS
     */
    @NotNull(message = "请选择启用状态", groups = {ValidationGroup.formEdit.class, ValidationGroup.formAdd.class, ValidationGroup.formQuery.class})
    @Min(message = "启用状态错误", value = NumeralUtil.POSITIVE_ONE, groups = {ValidationGroup.formEdit.class, ValidationGroup.formAdd.class, ValidationGroup.formQuery.class})
    @Max(message = "启用状态错误", value = Integer.MAX_VALUE, groups = {ValidationGroup.formEdit.class, ValidationGroup.formAdd.class, ValidationGroup.formQuery.class})
    @QueryParam(name = "enableStatus", code = "p.ENABLE_STATUS")
    private Integer enableStatus;

    /**
     * 设置邀请员工权限（7777=无权限，9999=有权限） INVITATION_STATUS
     */
    @NotNull(message = "请选择设置邀请员工权限（7777=无权限，9999=有权限）", groups = {ValidationGroup.formEdit.class, ValidationGroup.formAdd.class, ValidationGroup.formQuery.class})
    @Min(message = "设置邀请员工权限（7777=无权限，9999=有权限）错误", value = NumeralUtil.POSITIVE_ONE, groups = {ValidationGroup.formEdit.class, ValidationGroup.formAdd.class, ValidationGroup.formQuery.class})
    @Max(message = "设置邀请员工权限（7777=无权限，9999=有权限）错误", value = Integer.MAX_VALUE, groups = {ValidationGroup.formEdit.class, ValidationGroup.formAdd.class, ValidationGroup.formQuery.class})
    @QueryParam(name = "invitationStatus", code = "p.INVITATION_STATUS")
    private Integer invitationStatus;

    /**
     * 设置返利比例权限（7777=无权限，9999=有权限） REBATE_RATIO_STATUS
     */
    @NotNull(message = "请选择设置返利比例权限（7777=无权限，9999=有权限）", groups = {ValidationGroup.formEdit.class, ValidationGroup.formAdd.class, ValidationGroup.formQuery.class})
    @Min(message = "设置返利比例权限（7777=无权限，9999=有权限）错误", value = NumeralUtil.POSITIVE_ONE, groups = {ValidationGroup.formEdit.class, ValidationGroup.formAdd.class, ValidationGroup.formQuery.class})
    @Max(message = "设置返利比例权限（7777=无权限，9999=有权限）错误", value = Integer.MAX_VALUE, groups = {ValidationGroup.formEdit.class, ValidationGroup.formAdd.class, ValidationGroup.formQuery.class})
    @QueryParam(name = "rebateRatioStatus", code = "p.REBATE_RATIO_STATUS")
    private Integer rebateRatioStatus;

    /**
     * t_rights
     */
    private static final long serialVersionUID = 1L;

    public Integer getEnableStatus() {
        return enableStatus;
    }

    public void setEnableStatus(Integer enableStatus) {
        this.enableStatus = enableStatus;
    }

    public Integer getInvitationStatus() {
        return invitationStatus;
    }

    public void setInvitationStatus(Integer invitationStatus) {
        this.invitationStatus = invitationStatus;
    }

    public Integer getRebateRatioStatus() {
        return rebateRatioStatus;
    }

    public void setRebateRatioStatus(Integer rebateRatioStatus) {
        this.rebateRatioStatus = rebateRatioStatus;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", enableStatus=").append(enableStatus);
        sb.append(", invitationStatus=").append(invitationStatus);
        sb.append(", rebateRatioStatus=").append(rebateRatioStatus);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Rights other = (Rights) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getCreateId() == null ? other.getCreateId() == null : this.getCreateId().equals(other.getCreateId()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getOperaterId() == null ? other.getOperaterId() == null : this.getOperaterId().equals(other.getOperaterId()))
            && (this.getOperaterTime() == null ? other.getOperaterTime() == null : this.getOperaterTime().equals(other.getOperaterTime()))
            && (this.getOperaterStatus() == null ? other.getOperaterStatus() == null : this.getOperaterStatus().equals(other.getOperaterStatus()))
            && (this.getEnableStatus() == null ? other.getEnableStatus() == null : this.getEnableStatus().equals(other.getEnableStatus()))
            && (this.getInvitationStatus() == null ? other.getInvitationStatus() == null : this.getInvitationStatus().equals(other.getInvitationStatus()))
            && (this.getRebateRatioStatus() == null ? other.getRebateRatioStatus() == null : this.getRebateRatioStatus().equals(other.getRebateRatioStatus()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getCreateId() == null) ? 0 : getCreateId().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getOperaterId() == null) ? 0 : getOperaterId().hashCode());
        result = prime * result + ((getOperaterTime() == null) ? 0 : getOperaterTime().hashCode());
        result = prime * result + ((getOperaterStatus() == null) ? 0 : getOperaterStatus().hashCode());
        result = prime * result + ((getEnableStatus() == null) ? 0 : getEnableStatus().hashCode());
        result = prime * result + ((getInvitationStatus() == null) ? 0 : getInvitationStatus().hashCode());
        result = prime * result + ((getRebateRatioStatus() == null) ? 0 : getRebateRatioStatus().hashCode());
        return result;
    }
}